<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
       <%@ page import="org.dbi.rdbms.Rdbms,java.util.ArrayList,org.dbi.beans.Attribute,org.dbi.beans.AlternativeKey,org.dbi.beans.PrimaryKey,org.dbi.beans.ForeignKey,org.dbi.beans.Key,org.dbi.beans.Reference"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<a href=init.jsp>init</a> | 
<a href=showdatabases.jsp>show databases</a> | 
<a href=showtables.jsp>show tables</a>| 
<a href=select.jsp>select query</a><br> <br>
<%if(request.getParameter("table")!=null){ %>
	<%=Rdbms.getInstance().useTabel(request.getParameter("table")) %>
	<h2>Tabel <%=Rdbms.getInstance().getCurrentTable().getNaam() %></h2>
	<table border=1 bordercolor="black" cellspacing="1px" cellpadding="5 px">
	
		<%for(Attribute a : Rdbms.getInstance().getAttribsFromCurrentTable().values()){%>
		<%
		out.println("<tr>");
		 out.println("<td><b>" + a.getNaam() + "</b></td>");
		
		for(Object content : ((Attribute) a).getColumnValues())
		 {
			 out.println("<td>" + content.toString() + "</td>");
		 
		 }
		out.println("</tr>");
		
		%>		
		<%} %>
		
			
	</table>	
<%} %>
</body>
</html>